//Eric Leschinski
//A boggle game. 
#ifndef unjumbleclassH
#define unjumbleclassH

#include<vector>
#include<iostream.h>
#include<fstream.h>
#include<string.h>
#include<conio.h>
#include"stack.h"
using namespace std;

class unjumbleclass
{
   public:
      unjumbleclass();                //constructor
      char **getanswers(char **&);    //return list of answers found
      int getnumanswers();            //gets the number of answers currently

      int SizeWord2(char *);          //easier way to find length
      void sortanswerwords();         //sort the answers for viewing pleasure
      void UnJumbleWord(char *, int &); //big function, takes in word to unjumble
   private:

      int visit(int, int);
      void ClearTaken();
      char *trunkateword(char *word, int amt);
      int sizeofenglish;                //number of english words.
      int binarysearch();               //returns 1 0 -1 looking for a word
      listwords *english;               //all the english words in memory
      stack<char> *path;                //when we are stepping through letters
      int sizeword;                     //holds the size of the word
      char *theword;                    //temp var holds 
      bool *letterstaken;               //tells us when letters are taken
      int answercounter;                //number of answers we find
      char **answerarray;               //array holds answers
};

#endif
